import service from "@/utils/request"

import LoginWork from "@/utils/LoginWork"
// 待订购查询
export const PendingOrderInquiry = (pageNum: number, pageSize: number) => {
    return service.get<any, any>(`/SporadicClearanceOperation/getNotOrderDetailsList?pageNum=${pageNum}&pageSize=${pageSize}`)
}

// 生成订购资料
export const GenerateOrderInformation = (parms: any) => {
    return LoginWork.post<any, any>(`/SporadicClearanceOperation/makeOrderDetails`, parms)
}

// 带订购明细删除
export const deleteGenerateOrderInformation = (parms: any) => {
    return LoginWork.post<any, any>(`/SporadicClearanceOperation/deleteNotOrderDetails`, parms)
}

// 通用材料查询
export const GeneralMaterialsQuery = (parms: any) => {
    return service.post<any, any>(`/SporadicClearanceOperation/getCommonMaterialDetail`, parms)
}

// 待订购新增
export const AddGeneralMaterials = (parms: any) => {
    return LoginWork.post<any, any>(`/SporadicClearanceOperation/getBatchProcess`, parms)
}

// 进入所有订购单查询
export const AllSlipDateQuery = (parms: any) => {
    return service.post<any, any>(`/SporadicClearanceOperation/getAllPurchaseOrder`, parms)
}

// 指令明细
export const InstructionDetail = (parms: any) => {
    return service.post<any, any>(`/SporadicClearanceOperation/getAllPurchaseOrderLotDetail`, parms)
}

// 我的订购单查询
export const AllSlipDateQueryList = (parms: any) => {
    return service.post<any, any>(`/SporadicClearanceOperation/getMyPurchaseOrder`, parms)
}

// 形成订购单
export const FormAPurchaseOrder = (parms: any) => {
    return LoginWork.post<any, any>(`/SporadicClearanceOperation/makePurchaseOrder`, parms)
}

// 批量退回
export const BatchReturn = (parms:any) => {
    return LoginWork.post<any,any>(`/SporadicClearanceOperation/deletePurchaseOrder`,parms)
}